import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqAttributeUpdateHelper } from "../Public/SeqAttributeUpdateHelper";
import { SEntityId } from "../Public/SEntityId";
type int = number;
//class SDoFight
    
    export  class SDoFight extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SDoFight();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeShort(this.attackId);
            this.fromEntity.__write(arg1);
            this.entity.__write(arg1);
            SeqAttributeUpdateHelper.write(arg1, this.propertyUpdates);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.attackId = arg1.readShort();
            this.fromEntity = new SEntityId();
            this.fromEntity.__read(arg1);
            this.entity = new SEntityId();
            this.entity.__read(arg1);
            this.propertyUpdates = SeqAttributeUpdateHelper.read(arg1);
            return;
        }

        public /* const */_type: int=51;

        public /* var */attackId: int;

        public /* var */fromEntity: SEntityId;

        public /* var */entity: SEntityId;

        public /* var */propertyUpdates: Array<any>;

        public static /* var */_regist: SDoFight;
    }

            SDoFight._regist = new SDoFight(true);
        